bitkeeper revision 1.1159.1.61 (411de57crUA7TOOChvm_Z8Af1U17xw)
authorgm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk>
Sat, 14 Aug 2004 10:12:12 +0000 (10:12 +0000)
committergm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk>
Sat, 14 Aug 2004 10:12:12 +0000 (10:12 +0000)
blank space

tools/python/xen/xend/XendDomainInfo.py

index 2c31d643c1b688a6b4852a003c77be5d61e068be..7702c21fe386bf2f41cc4d62865dc04cca78b203 100644 (file)
@@ -475,6 +475,8 @@ class XendDomainInfo:
         if not dominfo:
             return
         print 'check_name>', 'dom=', dominfo.name, dominfo.dom, 'self=', name, self.dom
+        if dominfo.is_terminated():
+            return
         if not self.dom or (dominfo.dom != self.dom):
             raise VmError('vm name clash: ' + name)
         
@@ -490,7 +492,9 @@ class XendDomainInfo:
         try:
             self.name = sxp.child_value(config, 'name')
             self.check_name(self.name)
-            self.cpu_weight = float(sxp.child_value(config, 'cpu_weight'))
+           self.cpu_weight = float(sxp.child_value(config, 'cpu_weight'))
+            if self.restore and self.dom:
+                xc.domain_setname(self.dom, self.name)
             self.memory = int(sxp.child_value(config, 'memory'))
             if self.memory is None:
                 raise VmError('missing memory size')
@@ -630,6 +634,7 @@ class XendDomainInfo:
             if self.restart_pending():
                 self.console.deregisterChannel()
             else:
+                log.debug('Closing console, domain %s', self.id)
                 self.console.close()
         chan = xend.getDomChannel(self.dom)
         if chan: